﻿#include "SIX_Utility.h"

#include <math.h>

SIX_Utility *SIX_Utility::m_pUtility = 0;

// ---------------------------------------
SIX_Utility *SIX_Utility::GetInstance()
{
    if (!m_pUtility)
        m_pUtility = new SIX_Utility();

    return m_pUtility;
}

SIX_Utility::SIX_Utility()
{
	srand((unsigned int)time(0));
}

SIX_Utility::~SIX_Utility()
{

}


// 生成随机数
int SIX_Utility::RNDNUM(int min,int max)
{
	int rndnum = 0;

	rndnum = rand() % (max-min+1) + min;

	if (rndnum<min)
		rndnum=min;

	return rndnum;
};